function [ Dstates, Dactions, DnextStates, Drewards,legalMoves ] = humanTrajectoryToLearningFormat(fname)
%HUMANTRAJECTORYTOLEARNINGFORMAT Summary of this function goes here
%   Detailed explanation goes here
load(fname);
Dstates = [];
Dactions = [];
DnextStates = [];
Drewards = [];
legalMoves = data{1,1}.legalMoves;
for i=1:size(data,1)-1
    state = gameStateToQState(data{i,1});
    nextState = gameStateToQState(data{i+1,1});
    action = data{i,2};
    Dstates = [Dstates,state];
    Dactions = [Dactions,action];
    DnextStates = [DnextStates,nextState];
    Drewards = [Drewards,getRowReward(data{i,1},data{i+1,1})];
end
end

